import { Injectable } from '@nestjs/common'
import { InjectRepository } from '@nestjs/typeorm'
import { User } from '../entity/User'
import { Repository } from 'typeorm'
import { CreateUserDto } from '../dto/user.dto'

@Injectable()
export class AuthService {
  @InjectRepository(User) private usersRepository: Repository<User>

  getHello(): string {
    return 'Hello World!'
  }

  create(createUserDto: CreateUserDto) {
    return this.usersRepository.save(createUserDto)
  }
}
